package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.OliveRegionMapper;
import com.ruoyi.system.domain.OliveRegion;
import com.ruoyi.system.service.IOliveRegionService;

/**
 *    行政区划Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-29
 */
@Service
public class OliveRegionServiceImpl implements IOliveRegionService 
{
    @Autowired
    private OliveRegionMapper oliveRegionMapper;

    /**
     * 查询   行政区划
     * 
     * @param regionId    行政区划主键
     * @return    行政区划
     */
    @Override
    public OliveRegion selectOliveRegionByRegionId(Long regionId)
    {
        return oliveRegionMapper.selectOliveRegionByRegionId(regionId);
    }

    /**
     * 查询   行政区划列表
     * 
     * @param oliveRegion    行政区划
     * @return    行政区划
     */
    @Override
    public List<OliveRegion> selectOliveRegionList(OliveRegion oliveRegion)
    {
        return oliveRegionMapper.selectOliveRegionList(oliveRegion);
    }

    /**
     * 新增   行政区划
     * 
     * @param oliveRegion    行政区划
     * @return 结果
     */
    @Override
    public int insertOliveRegion(OliveRegion oliveRegion)
    {
        return oliveRegionMapper.insertOliveRegion(oliveRegion);
    }

    /**
     * 修改   行政区划
     * 
     * @param oliveRegion    行政区划
     * @return 结果
     */
    @Override
    public int updateOliveRegion(OliveRegion oliveRegion)
    {
        return oliveRegionMapper.updateOliveRegion(oliveRegion);
    }

    /**
     * 批量删除   行政区划
     * 
     * @param regionIds 需要删除的   行政区划主键
     * @return 结果
     */
    @Override
    public int deleteOliveRegionByRegionIds(Long[] regionIds)
    {
        return oliveRegionMapper.deleteOliveRegionByRegionIds(regionIds);
    }

    /**
     * 删除   行政区划信息
     * 
     * @param regionId    行政区划主键
     * @return 结果
     */
    @Override
    public int deleteOliveRegionByRegionId(Long regionId)
    {
        return oliveRegionMapper.deleteOliveRegionByRegionId(regionId);
    }


    /**
     * 查询   行政区划
     *
     * @param level
     * @return    行政区划
     */
    @Override
    public List<OliveRegion> selectOliveRegionByLevel(Integer level)
    {
        return oliveRegionMapper.selectOliveRegionByLevel(level);
    }
}
